{include file="public/header"}
<div class="page-content">
    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
        <div class="widget am-cf" style=" height: 800px;">
            <a href="{:url('Foods/selFoods')}">
                <i title="返回" class="iconfont"
                   style="font-size:2.5rem;float: left">&#xe697;</i></a>
                <form class="form-horizontal" id="form-validate" action="{:url('Foods/up')}" method="post" enctype="multipart/form-data" />
            <div class="widget-body">
                <fieldset>
                    <div class="widget-head am-cf">
                        <div class="widget-title am-cf">修改美食信息</div>
                    </div>
            <table id="datatables" class="table table-bordered table-striped responsive">
                              <tr>
                                <td rowspan='7'></td>
                                <td width="42%" rowspan="7" style="border-left:0px;">
                                <img src="/eat5/eat/public/Uploads/{$data.pic}" width="400" height='300'/>
                                </td>
                                <th width="17%">名称</th>
                                <td width="41%">
                                  <input type="hidden" name="id" value="{$data.id}" />
                                  <input type="text" name='name'  class="layui-input layui-input-inline" value="{$data.name}"/>
                                </td>
                              </tr>
                              <tr>
                                <th>上传</th>
                                <td><input type="file" class="layui-input layui-input-inline"
                                           style="border: none" name="pic" id="pic" /></td>
                              </tr>
                              <tr>
                                  <th>价格</th>
                                  <td>
                                  <input type="text" name='price' class="layui-input layui-input-inline" value="{$data.price}"/>
                                  </td>
                            </tr>
                            <tr>
                                  <th>上架时间</th>
                                  <td>{$data.regtime}</td>
                             </tr>
                            <tr>
                                  <th>所属分类</th>
                                  <td>
                                        <select name="cid" id="sname" class="layui-input layui-input-inline">
                                                {volist name="sdata" id="vc"}
                                                        <option value="{$vc.id}" {$vc['id']==$data['cid']?'selected':''}>
                                                            {$vc.sname}
                                                        </option>
                                                {/volist}
                                        </select>
                                  </td>
                             </tr>
                            <tr>
                                  <th>排行</th>
                                  <td>
                                  <input type="text" name='orderno' class="layui-input layui-input-inline" value="{$data.orderno}"/>
                                  </td>
                            </tr>
                            <tr>
                                  <th height="41">状态</th>
                                  <td>
                                    <select name="status" class="layui-input">
                                          <option value="1" {$data['status']==1?'selected':''}>
                                              在售
                                          </option>
                                          <option value="2" {$data['status']!=1?'selected':''}>
                                            下架
                                          </option>
                                    </select>
                                  </td>
                            </tr>
                <br>

                            <tr height='100' class="describe layui-form-text">
                                  <th height="50" >美食描述</th>
                                  <td colspan="3">
                                    <textarea name='describe' cols='93' rows='5'class="layui-textarea" style="height:100px;width:98%; resize:none;" />{$data.describe}</textarea>
                                  </td>
                            </tr>
                            <tr>
                                  <td height="50" colspan="4" style="text-align: center" >
                                        <button type="submit" class="j-submit am-btn am-btn-secondary">修改</button>
                                  </td>
                            </tr>
                        </tbody>
                    </table>
            </fieldset>
        </div>
                    </form>
                
            </div>
        </div>
        
    </div>

</body>
</html>